<template>
  <u-datetime-picker
      :show="show"
      v-model="value1"
      mode="date"
      @confirm="confirm"
      @cancel="close"
      :min-date="minDate"
  ></u-datetime-picker>
</template>

<script>
export default {
  data() {
    return {
      show: false,
      value1: "9",
      minDate: new Date(1979, 0, 1).getTime()
    };
  },
  methods: {
    open(value) {
      this.show = true;
      this.value1 = value;
    },
    close() {
      this.show = false;
    },
    confirm(date) {
      this.show = false;
      console.log(date.value, 'value');
      this.$emit('select', date.value);
    },
  },
}
</script>

<style lang="scss">

</style>
